home *** CD-ROM | disk | FTP | other *** search
- ;; C Durland Public Domain
-
- (const END 78) ;; column last character on line will be in
-
- (defun
- end-slide ;; move text so right part ends at col
- {
- (int col n x)
-
- (n (if (arg-flag) (arg-prefix) END))
-
- (delete-horizontal-space)
- (col (current-column))
- (end-of-line)
- (x (+ 1 (- n (current-column))))
- (current-column col)
- (to-col (+ col x))
- }
- MAIN
- {
- (bind-to-key "end-slide" "M-`")
- }
- )
-
- ;;/* ******************************************************************** */
- ;;/* *************************** Header Text **************************** */
- ;;/* ******************************************************************** */
- (defun
- c-header-with-text
- {
- (int n len)
- (string text)
-
- (text (ask "Header text: "))
- ;(n (- 66 (/ (len (length-of text)) 2)))
- (n (/ (- 66 (len (length-of text))) 2))
- (insert-text
- "/* ******************************************************************** */^J")
- (insert-text "/* "
- (extract-elements
- "********************************************************************"
- 0 n)
- " " text " "
- (extract-elements
- "********************************************************************"
- 0 n)
- (if (!= len (* 2 (/ len 2))) "*" "") ;; pad odd length text
- " */^J")
- (insert-text
- "/* ******************************************************************** */^J")
- }
- )
-